package com.summer.core.entity;

import java.util.List;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Transient;

import com.summer.core.common.BeanName;


@Entity
@BeanName("数据表")
public class STable extends BaseBean {

	private static final long serialVersionUID = 4707674189499153201L;
	//bean名称
	private String name;
	//类路径
	private String className;
	//模块名称
	private String cnName;
	//访问路径
	private String path;
	//排序字段
	private String orderBy;
	//排序类型
	private String ordertype;
	//是否子表
	private String is_detail;
	
	private String author;
	
	
	private List<Field> field;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public String getCnName() {
		return cnName;
	}

	public void setCnName(String cnName) {
		this.cnName = cnName;
	}

	@OneToMany(mappedBy = "table", fetch = FetchType.LAZY)
	public List<Field> getField() {
		return field;
	}

	public void setField(List<Field> field) {
		this.field = field;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getOrderBy() {
		return orderBy;
	}

	public void setOrderBy(String orderBy) {
		this.orderBy = orderBy;
	}

	public String getOrdertype() {
		return ordertype;
	}

	public void setOrdertype(String ordertype) {
		this.ordertype = ordertype;
	}

	public String getIs_detail() {
		return is_detail;
	}

	public void setIs_detail(String isDetail) {
		is_detail = isDetail;
	}

	@Transient 
	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}
}
